/*
 *  This file is part of WWWPal.
 *
 *  Copyright (C) 2003  Dr. John Punin, Department of Computer Science
 *  Rensselaer Polytechnic Institute
 *
 *  WWWPal is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  WWWPal is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Foobar; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef LOGR_FUNCTIONS_H
#define LOGR_FUNCTIONS_H

#include "LOGR_logs.h"
#include "LOGR_users.h"
#include "LOGR_gen_links.h"

/*
 * Added by asm.
 * My system doesnt know what a ulong_t is ...
 */
typedef unsigned long int ulong_t;

char *
LOGR_parse_current_directory(char *filename);

char *
LOGR_complete_filename(char *base_filename, char *rel_filename);

void
HTMime_init();
void
HTMime_deleteAll();
char *
HTGetMime(char *url);
short
LOGR_is_url_has_suffix(char *urls);

short
LOGR_is_object(char *url);

TypeReferer
LOGR_type_url(char *url);

TypeEdgeReferer
LOGR_type_edge_referer(WebStatPtr wsn,char *uri);

short
LOGR_is_url_non_html(char *url);

HTAssocList *
HTParse_query(char *url);

SearchEngineType 
LOGR_get_search_engine_type(char *url);

void
LOGR_string_tolower(char *str);

PUBLIC time_t 
HTParseTimeApache (const char * str);

char *
LOGR_string_month(int month);

char *
LOGR_gen_string_id(char *urls, char *urlt);

void 
LOGR_sort_graph_edges(void *GArray);

short
LOGR_is_graphs_equal(void *GArray,void *HArray);

void *
init_graph_array();

void
delete_graph_array(void *GArray);

WebGenLinkPtr
LOGR_get_gen_edge_i(void *GArray,int i);

int 
LOGR_get_number_edges(void *GArray);

void *
init_current_users();

void
delete_list_current_users(void *lcusers);

void *
find_user_in_list_current_users(void *lcusers, char *nuser);

void 
add_user_to_list_current_users(void *lcusers, WebUserPtr usn);

WebGenLinkPtr 
LOGR_add_edge_graph(void *GArray,char *urls, char *urlt,
		    WebStatPtr wsf,GraphFrame *gf);

const char *
LOGR_get_url_title(GraphFrame *gf,char *url);
    

char *
LOGR_get_xml_string(char *str);


#endif


